<?php
require_once ("./commun/ouvre_base.php");

// ~ $link = mysql_connect($host, $userbase, $passwd) or die('Impossible de se connecter pour récupérer niveau : ' . mysql_error());
mysql_select_db ( $db ) or die ( 'Impossible de s&#233;lectionner la base de donn&#233;es' );

$id = $_SESSION ['id'];
$queryuser = "SELECT *
		FROM `users`
		WHERE `last_name` LIKE '$id';";
$resultuser = mysql_query ( $queryuser ) or die ( "Impossible de r&#233;cup&#233;rer la liste des users" . mysql_error () );
$pwd = array ();
while ( $line = mysql_fetch_row ( $resultuser ) ) {
	array_push ( $pwd, $line [2] );
	array_push ( $pwd, $line [3] );
}

$_SESSION ['acces_clinique'] = $pwd [0];
$_SESSION ['acces_genetique'] = $pwd [1];

?>
